<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: zoud
  Date: 2016/10/24
  Time: 18:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h2 class="ui header">Databases overview</h2>
<div class="ui sub-header">
    Curate the database you are interested in.
</div>
<div class="ui segment">
    <table id="table" class="ui table bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Country</th>
            <th>City</th>
            <th>Institution</th>
            <th>Curate</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${databases}" var="db">
            <tr>
                <td>${db.dbId}</td>
                <td>${db.shortName}</td>
                <td>${db.country}</td>
                <td>${db.city}</td>
                <td>${db.hostInstitution}</td>
                <td><a href="${host}/curator/db/edit/${db.dbId}" class="ui button mini yellow">Curate</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
<script>
    $(document).ready(function () {
        $("#table").dataTable();
    })
</script>
</body>
</html>
